package com.noahplat.person.pojo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

/**
 * @ClassName: Defecate
 * @Description: 排便情况实体类
 * @Author 李景星
 * @Date 2021/3/8
 * @Version 1.0
 */
@Data
@Table(name = "enum_defecate")
public class Defecate {

    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id;    //主键

    @NotEmpty(message = "排便情况不能为空")
    @Length(max = 20, message = "排便情况长度不符合要求")
    private String defecate;    //排便情况

    @NotEmpty(message = "排便情况不能为空")
    @Length(max = 20, message = "排便情况长度不符合要求")
    private String code;    //排便情况代码
}
